package com.ocom.payconfig.client;

import com.alibaba.fastjson.JSONObject;
import com.ocom.common.constant.RecodeUrl;
import com.ocom.common.constant.UnifiendPayUrl;
import com.ocom.common.entity.card.EntityXfGoodListDishes;
import com.ocom.common.entity.card.EntityXfGoodListOrg;
import com.ocom.common.entity.card.EntityXfRecord;
import com.ocom.common.entity.payconfig.EntityMqttOperation;
import com.ocom.common.request.emqx.TimerMqttOrderRequest;
import com.ocom.common.request.exposeapi.LargeScreenRequest;
import com.ocom.common.request.payconfig.mealorder.GetOrderDishesRequest;
import com.ocom.common.request.payconfig.mealorder.RefundOrderDishesRequest;
import com.ocom.common.request.ugcapi.OrderedShowRequest;
import com.ocom.common.request.web.GetConsDeptReportsRequest;
import com.ocom.common.request.web.GetPointMealPreReportsRequest;
import com.ocom.common.request.web.GetPointMealSendReportsRequest;
import com.ocom.common.request.web.GetPointMealSendReportsXMRequest;
import com.ocom.common.request.xfrecde.GetGroupDataRequest;
import com.ocom.common.request.xfrecde.GetXfGoodListRequest;
import com.ocom.common.request.xfrecde.XfGoodListByPointIdRequest;
import com.ocom.common.resp.Result;
import com.ocom.common.vo.xfrecode.GetPointMealSendVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient(value = "xfrecode")
public interface XfRecordFeign {

    @PostMapping(UnifiendPayUrl.URL_sveXfRecord)
    Result sveXfRecord(@RequestBody EntityXfRecord entityXfRecord);

    //查询每天各餐段汇总结果
    @PostMapping(UnifiendPayUrl.URL_dayTotalMealNo)
    public Result times(@RequestBody JSONObject jsonObject);

   //查询每天各餐段汇总结果-厦门
   @PostMapping(UnifiendPayUrl.URL_dayTotalMealNoXM)
   Result timesXM(@RequestBody JSONObject jsonObject);

    //查询每天各支付方式汇总结果
    @PostMapping(UnifiendPayUrl.URL_dayTotalPayType)
    public Result dayTotalPayType(@RequestBody JSONObject jsonObject);

   //查询每天各支付方式汇总结果 for 厦门
   @PostMapping(UnifiendPayUrl.URL_dayTotalPayTypeXM)
   Result dayTotalPayTypeXM(@RequestBody JSONObject jsonObject);

    //查询每天各收款账户汇总结果
    @PostMapping(UnifiendPayUrl.URL_dayTotalAccount)
    public Result dayTotalAccount(@RequestBody JSONObject jsonObject);

    //查询每天各收款账户汇总结果
    @PostMapping(UnifiendPayUrl.URL_dayTotalAccountXM)
    Result dayTotalAccountXM(@RequestBody JSONObject jsonObject);

    //查询每月各餐段汇总结果
    @PostMapping(UnifiendPayUrl.URL_monthTotalMealNo)
    public Result monthTotalMealNo(@RequestBody JSONObject jsonObject);

    //查询每月各支付方式汇总结果
    @PostMapping(UnifiendPayUrl.URL_monthTotalPayType)
    public Result monthTotalPayType(@RequestBody JSONObject jsonObject);

    // 查询每月各收款账户汇总结果
    @PostMapping(UnifiendPayUrl.URL_monthTotalAccount)
    public Result monthTotalAccount(@RequestBody JSONObject jsonObject);

    //查询每天各餐段汇总不是饭堂的结果
    @PostMapping(UnifiendPayUrl.URL_totalMealNoCanteenNo)
    public Result dayTotalMealNoCanteenNo(@RequestBody JSONObject jsonObject);


    //查询每天各餐段汇总不是饭堂的结果
    @PostMapping(UnifiendPayUrl.URL_monthMealNoCanteenNo)
    public Result monthMealNoCanteenNo(@RequestBody JSONObject jsonObject);

    //获取部门消费汇总报表
    @PostMapping(UnifiendPayUrl.URL_getConsDeptReports)
    public Result getConsDeptReports(@RequestBody GetConsDeptReportsRequest getConsDeptReportsRequest);

    //获取商户消费汇总报表
    @PostMapping(UnifiendPayUrl.URL_getConsMerchReports)
    public Result getConsMerchReports(@RequestParam("comId") Long comId,@RequestParam("startTime")  String startTime,@RequestParam("endTime")  String endTime,@RequestParam("merchIds")  String merchIds);


    @PostMapping(UnifiendPayUrl.URL_getChannelData)
    public Result getChannelData(@RequestParam("comId")Long comId,
                                 @RequestParam("payChannelNo")String payChannelNo,
                                 @RequestParam("startTime")String startTime ,
                                 @RequestParam("endTime")String endTime);

    @PostMapping(UnifiendPayUrl.URL_getGroupData)
    public Result getGroupData(@RequestBody GetGroupDataRequest request);


    @PostMapping(UnifiendPayUrl.URL_refundXfGoodList)
    public Result refund(@RequestBody RefundOrderDishesRequest request);

    @PostMapping(UnifiendPayUrl.URL_getOrderDishes)
    public Result getOrderDishes(@RequestBody GetOrderDishesRequest request);

    @PostMapping(UnifiendPayUrl.URL_getOrderDishesB)
    public Result getOrderDishesB(@RequestBody GetOrderDishesRequest request);

    @PostMapping(UnifiendPayUrl.URL_getOrderDishesDetail)
    public Result getOrderDishesDetail(@RequestBody OrderedShowRequest request);

    @PostMapping(UnifiendPayUrl.URL_getEntityXfRecord)
    public Result getEntityXfRecord(@RequestParam String orderNo, @RequestParam String monthValue);

    @PostMapping(UnifiendPayUrl.URL_getXfGoodListByPointId)
    public Result getXfGoodListByPointId(@RequestBody XfGoodListByPointIdRequest request);

    @PostMapping(UnifiendPayUrl.URL_getPointMealPre)
    public Result getPointMealPre(@RequestBody GetPointMealPreReportsRequest request);

    @PostMapping(UnifiendPayUrl.URL_getPointMealSend)
    public Result<List<GetPointMealSendVo>> getPointMealSend(@RequestBody GetPointMealSendReportsRequest request);

    @PostMapping(UnifiendPayUrl.URL_getPayDate)
    public Result getPayDate(@RequestParam Long comId,@RequestParam String payDate);

    @PostMapping(UnifiendPayUrl.Url_yesterdayStudentMealRate)
    public Result yesterdayStudentMealRate(@RequestBody LargeScreenRequest request);

    @PostMapping(UnifiendPayUrl.URL_getMealSendReportsXMByGoods)
    public Result getMealSendReportsXMByGoods(@RequestBody GetPointMealSendReportsXMRequest request);

    @PostMapping(RecodeUrl.URL_saveOrUpdateMqttOperation)
    public Result saveOrUpdateMqttOperation(@RequestBody EntityMqttOperation entityMqttOperation);

    @PostMapping(RecodeUrl.URL_updateMqttOperation)
    public Result updateMqttOperation(@RequestBody EntityMqttOperation entityMqttOperation);


   @PostMapping(RecodeUrl.URL_detailMqttOperation)
   public Result<EntityMqttOperation> detailMqttOption(@RequestBody EntityMqttOperation entityMqttOperation);

  @PostMapping(RecodeUrl.URL_timerMqttOrder)
  public Result<List<EntityMqttOperation>> timerMqttOrder(@RequestBody TimerMqttOrderRequest request);


    @PostMapping(UnifiendPayUrl.URL_getXfGoodList)
    public Result getXfGoodList(@RequestBody GetXfGoodListRequest request);

    @PostMapping(UnifiendPayUrl.URL_updateGoodsById)
    public Result updateGoodsById(@RequestBody EntityXfGoodListOrg entityXfGoodListOrg);
}
